const express = require('express');
const path = require('path');
const proxy = require('express-http-proxy');
const app = express();
app.use(express.static(`${__dirname}/`));
var url="http://119.23.57.158:8085";
app.use('/v1', proxy(url, {
	proxyReqPathResolver: function (req) {
		return '/v1' + req.url;
	}
}));
app.get('*', (req, res) => {
	console.log(req);
	res.sendFile(path.join(`${__dirname}/index.html`));
});
app.listen(8484, () => {
	console.log('App listening on port 8484!');
});
module.exports = app;
